collaborative github intro

Anna Krystalli

22 July 2016

intro

github for collaboration (in RStudio)

github & science

The need for a logical way to organize and control revisions has existed for almost as long as writing has existed, but revision control became much more important, and complicated, when the era of computing began.

version control

  • long been used to maintain code repositories in the software industry

    especially in open source software

  • science increasingly computational

    demands for increased openness




modern science workflows

can be overwhelming

succesful modern science workflows

can be extremely powerful

github for science

ideal for managing the full suite of research outputs such as datasets, statistical code, figures, lab notes, and manuscripts.

Rstudio for r users

invest in next generation science skills

…and super-charge your teams

…or get left behind

empowering collaboration

repos

centralising information e.g. ROpenSci / rfishbase

issues

project management

commits

project tracking

fostering reproducibility

commits

traceability

entire process of project evolution reproducible

demo

start with a repo

https://github.com/RSE-Sheffield/collaborative_github_exercise

fork repo

  • make your own copy of the repository on github - fork are linked and traceable

  • clone it: copy repo link

create new project

  • use repo link to checkout from github
  • manage process through projects in Rstudio

make a change

  • open params/params_tmpl.R
  • save as new .R script in params/ folder. Use species name to name new file
  • edit file with parameters of your choice

commit

  • make small commits often
  • write informative messages

push

  • push changes up to github

create pull request

  • create request to merge fork to master

check merge

  • check original repo to see your merged changes

exercise

your mission

  • fork the repo
  • link it up to an Rstudio project
  • create a new file params .R script. Name it using your initials (use 3 to be safe)
  • enter parameters for your species.

resources

link to presentation

Karthik Ram’s article: ‘Git can facilitate greater reproducibility and increased transparency in science’

Getting started with GitHub from materials for a software carpentry course at UBC

Slides for lecture Karl Broman gave on git/github, with notes

joeyklee’s friendly github intro. Mozilla Science Lab workshop